package com.netty.decoder.frame_codec;

import io.netty.bootstrap.ServerBootstrap;
import io.netty.handler.codec.LengthFieldBasedFrameDecoder;

/**
 * @author xl-9527
 * @since 2025/8/7
 **/
public class LengthFieldBaseDecoderDemo {

    public ServerBootstrap run(final int port) {
        final ServerBootstrap serverBootstrap = new ServerBootstrap();
        serverBootstrap.bind(port);
        return serverBootstrap;
    }

    static class LengthFieldBaseDecoder extends LengthFieldBasedFrameDecoder {

        public LengthFieldBaseDecoder(final int maxFrameLength, final int lengthFieldOffset, final int lengthFieldLength) {
            super(maxFrameLength, lengthFieldOffset, lengthFieldLength);
        }
    }
}
